<template>
  <div class="card-container" shadow="hover">
    <h3>{{ who == 'tag' ? '标签云' : '分类云' }}</h3>
    <div class="hr_2"></div>
    <div class="tag-cloud">
      <ul>
        <a v-for="item in info" :key="item.id" @click="jump(item.id,who)">
          {{ item.name }}
        </a>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  name: "CardForTag",
  props: {
    info: {},
    who: {
      type: String,
      required: true
    }
  },
  methods: {
    jump(id, who) {
      if (who == 'category') {
        this.$router.push(`/category/${id}`)
      } else {
        this.$router.push(`/tag/${id}`)
      }
    }
  }
}
</script>

<style scoped>

</style>
